//
//  ShoppingButton.m
//  FreeTrip
//
//  Created by 352324497@qq.com on 15/11/24.
//  Copyright © 2015年 邓芮. All rights reserved.
//

#import "ShoppingButton.h"

@implementation ShoppingButton

-(void)setFrame:(CGRect)frame
{
    [_textLabel removeFromSuperview];
    [_customImageView removeFromSuperview];
    
    CGFloat width = 32 * KScreenWidth / 375;
    
    // 创建视图
    _customImageView = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, 32 * KScreenWidth / 375, 32 * KScreenWidth / 375)];
    [self addSubview:self.customImageView];
    

    _textLabel = [[UILabel alloc]initWithFrame:CGRectMake(32 * KScreenWidth / 375, 0, frame.size.width - width, 32 * KScreenWidth / 375)];
    _textLabel.font = [UIFont systemFontOfSize:16 * KScreenWidth / 375];
    [self addSubview:self.textLabel];
    
    [super setFrame:frame];
}


@end
